﻿@model IEnumerable<Yunwei.Web.Areas.RRShop.Models.StaffViewModel>

@{
    ViewBag.Title = "List";
}

<div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">员工列表</h1>
    </div>
    <div class="col-lg-6">
        <a class="btn btn-primary btn-circle" href="/RRShop/Staff/Add/@ViewBag.Id"><i class="fa fa-plus"></i></a>
    </div>
</div>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Avatar)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Age)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Salary)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.JobToString)
        </th>
        <th>
        </th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                <img src="@item.Avatar" width="18" height="32" />
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Age)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Salary)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.JobToString)
            </td>
            <td>
                @Html.ActionLink("编辑", "Edit", new { id = item.Id , restaurant_id = item.Restaurant_Id}) |
                @Html.ActionLink("删除", "Delete", new { id = item.Id, restaurant_id = item.Restaurant_Id })
            </td>
        </tr>
    }

</table>
